package com.retail.marketing.server.strategy;

import com.retail.marketing.common.emu.CouponEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: 靳家振
 * @Date: 2024/3/3 09:06
 * @Description:
 **/

@Component
public class CouponStrategyContext {

    @Autowired
    private Map<String, CouponStrategy> couponStrategyMap =new HashMap<>();

    public CouponStrategy getType(CouponEnum couponEnum){
        return couponStrategyMap.get (couponEnum.getCouponName ());//fullMinusCoupon
    }
}
